package com.lufei.dh.bottom;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.lufei.dh.R;
import com.lufei.dh.bottom.Fragment.Fragment1;
import com.lufei.dh.bottom.Fragment.Fragment2;
import com.lufei.dh.bottom.Fragment.Fragment3;
import com.lufei.dh.bottom.Fragment.Fragment4;
import com.lufei.dh.bottom.Fragment.Fragment5;
import com.lufei.dh.bottom.Fragment.Fragment6;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 版权：易金卡沃 版权所有
 * <p>
 * 作者：lufei
 * <p>
 * 创建日期：2018/6/25
 * <p>
 * 描述：
 * <p>
 * 修订历史：
 */
public class BottomActivity extends AppCompatActivity {
    @BindView(R.id.bottom_bar)
    BottomBar bottomBar;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bottom);
        ButterKnife.bind(this);
        init();
    }
    private void init(){
        bottomBar.setContainer(R.id.fl_container)
                .setTitleBeforeAndAfterColor("#999999", "#ff5d5e")
                .addItem(Fragment1.class,
                        "首页",
                        R.drawable.sss1,
                        R.drawable.item1_after)
                .addItem(Fragment2.class,
                        "订单",
                        R.drawable.vvv1,
                        R.drawable.vvv2)
                .addItem(Fragment3.class,
                        "我的",
                        R.drawable.mmm1,
                        R.drawable.mmm2)
                .addItem(Fragment4.class,
                        "MultAuto",
                        R.mipmap.m_img1,
                        R.mipmap.m_img2)
                .addItem(Fragment5.class,
                        "天气",
                        R.drawable.mmm1,
                        R.drawable.mmm2)
                .addItem(Fragment6.class,
                        "测试",
                        R.drawable.mmm1,
                        R.drawable.mmm2)
                .setFirstChecked(1)
                .build();
    }
}
